package com.atguigu06.polymorphism.exer1;

/**
 * ClassName: MyRectangle
 * Package: com.atguigu06.polymorphism.exer1
 * Description:
 *
 * @Author xiao_qi
 * @Create 2024/9/2 10:55
 * @Version 1.0
 */
public class MyRectangle extends GeometricObject {
    private double width;
    private double height;
    public MyRectangle(String color,double weight,double width,double height) {
        super(color, weight);
        this.width = width;
        this.height = height;
    }

    @Override
    public double getWeight() {
        return weight;
    }
    public double getHeight(){
        return height;
    }
    public void setWidth(double width){
        this.width = width;
    }
    public void setHeight(double height){
        this.height = height;
    }
    public double findArea(){
        return width*height;
    }
}
